package com.ryl.yomall.item.controller;

import com.ryl.yomall.item.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Date 13:11
 * @Author ryl
 */
@RequestMapping("/api/item")
@RestController
public class ItemController {
    @Autowired
    private ItemService itemService;


    @GetMapping("/{skuId}")
    public Map getItem(@PathVariable(name = "skuId") Long skuId){
        return itemService.getItem(skuId);
    }


}
